
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<html>
<head>

<script language="JavaScript" src="<%=request.getContextPath()+"/js/gen_validatorv31.js"%>" type="text/javascript"></script>


</head>

<body bgcolor="">


<jsp:include page="Header.jsp"></jsp:include>

    <h2 align="center"><font color="#4D88DB">Question paper</font></h2>
<form action="<%=request.getContextPath()+"/AddQuestion"%>" name="exampaper">
<table align="center" border="1">
    
    <tr><td><b><font color="">QuestionText:</font></b></td><td><textarea name="qtext"/></textarea></td></tr>
    <tr><td><b><font color="">Answer1:</font></b></td><td><input type="text" name="ans1"/></td></tr>
    <tr><td><b><font color="">Answer2:</font></b></td><td><input type="text" name="ans2"/></td></tr>
    <tr><td><b><font color="">Answer3:</font></b></td><td><input type="text" name="ans3"/></td></tr>
    <tr><td><b><font color="">Answer4:</font></b></td><td><input type="text" name="ans4"/></td></tr>
    <tr><td><b><font color="">CorrectAnswer:</font></b></td><td><input type="text" name="qans"/></td></tr>
<tr><td></td><td><input type="submit" value="        Insert       "/></td></tr></table><br><br>

</form>
<script language="JavaScript" type="text/javascript">
//You should create the validator only after the definition of the HTML form
  var frmvalidator  = new Validator("exampaper");

  frmvalidator.addValidation("qtext","req","QuestionPaper is required");
    frmvalidator.addValidation("qtext","alpha","QuestionPaper is Only Characters");
    frmvalidator.addValidation("ans1","req","Ans1 is required");
    frmvalidator.addValidation("ans2","req","Ans2 is required");
    frmvalidator.addValidation("ans3","req","Ans3 is required");
    frmvalidator.addValidation("ans4","req","Ans4 is required");
    frmvalidator.addValidation("qans","req","QuestionAnser is required");
     frmvalidator.addValidation("city","alpha","Feedback is Only Characters");
     </script>

<jsp:include page="Footer.jsp"></jsp:include>

</body>
</html>

		